<template>
    <div class="login">
        <el-card style="width: 500px;height: 300px;">
            <template #header>
            <div class="card-header">
                <span>登录</span>
                <span :class="{ac:isWeb}" @click="checkout(true)">网页</span>
                <span :class="{ac:!isWeb}" @click="checkout(false)">桌面</span>
            </div>
            </template>
            <Form />
        </el-card>
    </div>
</template>
<script setup lang='ts'>
import { set ,get} from "../utils/session";
import Form from "./components/Form.vue"
import {ref,onMounted} from "vue"
// import {isWeb} from "./port.ts"
const isWeb=ref<boolean>(false)
onMounted(()=>{
    let res=get("port")
    isWeb.value=!!res
})
const checkout=(b:boolean)=>{
    isWeb.value=b
    set('port',b)
}
</script>
<style scoped lang="less">
    .login{
        width: 100vw;
        height: 100vh;
        background: gainsboro;
        display: flex;
        justify-content: center;
        align-items: center;
        .ac{
            color: rgb(43, 161, 246)
        }
    }
</style>
